/**
 * 
 */
$(function() {
	$.ajax({
		url : "1/list",
		type : "post",
		data : {

		},
		success : function(data) {
			var jsonStr = hexToString(data);
			var jsonObject = JSON.parse(jsonStr);
			var tbody = $("#tblSection").find("tbody");
			tbody.empty();
			$(jsonObject.list).each(function(index, val) {
				var tr = $("<tr></tr>");
				var td = $("<td></td>");
				var link = $("<a href='javascript:void(0);' onclick='jumpPostList("+val.id+")'>" + val.name + "</a>");
				tbody.append(tr);
				tr.append(td);
				td.append(link);
			});
		},
		complete : function() {
		}
	});
});

function jumpPostList(sectionId) {
	var form = $("<form action='2' method='post'></form>");
	form.append("<input name='sectionId' type='hidden' value='" + sectionId + "'/>");
	$("#jumpDiv").empty().append(form);
	form.submit();
}